public class Test {
    //
    public static void test1(int[] a){
        if (a == null){
            throw new NullPointerException();
        }
    }

    public static void main(String[] args) {
        try{
            test1(null);
        }catch (NullPointerException nullPointerException){
            System.out.println("捕捉到了 NullPointerException 异常");
        }
        System.out.println("正常逻辑");
    }
}
